import service from "@/utils/fetch";
const post = {
  //查询小料分页
  listSkuMaterial(params) {
    return service({
      method: "get",
      params,
      url: "/api/skuMaterial/",
    });
  },

  //新增小料
  addSkuMaterial(params) {
    return service({
      method: "post",
      data: params,
      url: "/api/skuMaterial/",
    });
  },

  //编辑小料
  editSkuMaterial(params) {
    return service({
      method: "put",
      data: params,
      url: "/api/skuMaterial/",
    });
  },

  //删除小料
  deleteSkuMaterial(ids) {
    return service({
      method: "delete",
      data: ids,
      url: "/api/skuMaterial/",
    });
  },

  //启用小料表
  enableSkuMaterial(id) {
    return service({
      method: "post",
      url: `/api/skuMaterial/enable/${id}`,
    });
  },

  //禁用小料表
  disableSkuMaterial(id) {
    return service({
      method: "post",
      url: `/api/skuMaterial/disable/${id}`,
    });
  },
};

export default post;
